package com.learn.xueer.ui.activity

import android.os.Bundle
import androidx.lifecycle.Observer
import com.learn.xueer.app.base.BaseActivity
import com.learn.xueer.databinding.ActivityFeedbackBinding
import com.learn.xueer.ui.viewmodel.MineViewModel

/**
 * 意见反馈
 */
class FeedBackActivity : BaseActivity<MineViewModel, ActivityFeedbackBinding>() {
    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.click = ProxyClick()
    }

    override fun createObserver() {
        mViewModel.feedResult.observe(this, Observer {
            if (it) {
                finish()
            }
        })
    }

    inner class ProxyClick {
        fun back() {
            finish()
        }

        fun submit() {
            mViewModel.feedBackReq()
        }

    }
}